package com.topvision.gsj.launcher.domain;

import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
/**
 * 用來封裝應用程序基本信息
* @ClassName: AppInfo    
* @Description:  
* Company topvision  
* @author jackGu  
* @date 2016-5-6 下午5:56:38    
*
 */
public class AppInfo implements Parcelable {

	private static final long serialVersionUID = 1L;
	
	private String appName = "";
	private String packageName = "";
	private String versionName = "";
	private int versionCode = 0;
	private Drawable appIcon = null;
	private String className;

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getVersionName() {
		return versionName;
	}

	public void setVersionName(String versionName) {
		this.versionName = versionName;
	}

	public int getVersionCode() {
		return versionCode;
	}

	public void setVersionCode(int versionCode) {
		this.versionCode = versionCode;
	}

	public Drawable getAppIcon() {
		return appIcon;
	}

	public void setAppIcon(Drawable appIcon) {
		this.appIcon = appIcon;
	}
	

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}
	
	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel out, int flags) {
		out.writeString(appName);
		out.writeString(packageName);
		out.writeString(versionName);
		out.writeInt(versionCode);
		out.writeString(className);

	}
	


	public static final Parcelable.Creator<AppInfo> CREATOR = new Creator<AppInfo>() {
		@Override
		public AppInfo[] newArray(int size) {
			return new AppInfo[size];
		}

		@Override
		public AppInfo createFromParcel(Parcel in) {
			return new AppInfo(in);
		}
	};

	public AppInfo(Parcel in) {
		appName = in.readString();
		packageName = in.readString();
		versionName = in.readString();
		versionCode = in.readInt();
		className = in.readString();
	}

	public AppInfo() {
	}
}
